home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_vim.idb / usr / freeware / share / vim / menu.vim.z / menu.vim
Encoding:
Text File  |  1998-10-28  |  2.4 KB  |  77 lines

  1. " These menu commands create the default Vim menus.
  2.  
  3. " You can use this as a start for your own set of menus.
  4.  
  5. " Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would
  6. " not be recognized.  See ":help 'cpoptions'".
  7. let cpo_save = &cpo
  8. let &cpo = ""
  9.  
  10. " Help menu
  11. " Note that "amenu" is used to make it work in all modes
  12. 9999amenu Help.Overview\ \ <F1>        :help<CR>
  13. 9999amenu Help.How\ to\.\.\.        :help how-to<CR>
  14. 9999amenu Help.GUI            :help gui<CR>
  15. 9999amenu Help.Version            :version<CR>
  16. 9999amenu Help.Credits            :help credits<CR>
  17. 9999amenu Help.Copying            :help uganda<CR>
  18.  
  19. " File menu
  20. 10amenu File.Open\ \ \ \ \ \ \ \ \ :e    :e<Space>
  21. 10amenu File.Split-Open\ \ \ :sp    :sp<Space>
  22. 10amenu File.Save\ \ \ \ \ \ \ \ \ :w    :w<CR>
  23. 10amenu File.Close\ \ \ \ \ \ \ \ :q    :q<CR>
  24. if has("unix")
  25.   10amenu File.Print            :w !lpr<CR>
  26.   10vmenu File.Print            :w !lpr<CR>
  27. elseif has("win32")
  28.   " Use Notepad for printing.
  29.   10amenu File.Print :let ttt=tempname()<Bar>exec ":w! ".ttt<Bar>exec "!start notepad /p ".ttt<Bar>exec "!del ".ttt<CR>
  30.   10vmenu File.Print <Esc>:let ttt=tempname()<Bar>exec ":'<,'>w! ".ttt<Bar>exec "!start notepad /p ".ttt<Bar>exec "!del ".ttt<CR>
  31. endif
  32. 10amenu File.Save-Exit\ \ \ \ :wqa    :wqa<CR>
  33. 10amenu File.Exit\ \ \ \ \ \ \ \ \ :qa    :qa<CR>
  34. 10amenu File.Exit\ NO\ Save\ :qa!    :qa!<CR>
  35.  
  36. " Edit menu
  37. 20amenu Edit.Undo            u
  38. 20amenu Edit.Redo            <C-R>
  39. 20vmenu Edit.Cut            x
  40. 20vmenu Edit.Copy            y
  41. 20nmenu Edit.Put\ Before        [p
  42. 20imenu Edit.Put\ Before        <C-O>[p
  43. 20nmenu Edit.Put\ After            ]p
  44. 20imenu Edit.Put\ After            <C-O>]p
  45. 20nmenu Edit.Paste            i<C-R>*<Esc>
  46. 20vmenu Edit.Paste            ""xi<C-R>*<Esc>
  47. 20menu! Edit.Paste            <C-R>*
  48. 20amenu Edit.Search            /
  49. 20amenu Edit.Search\ \&\ Replace    :%s/
  50. 20vmenu Edit.Search\ \&\ Replace    :s/
  51.  
  52. " Window menu                
  53. 30amenu Window.New            <C-W>n
  54. 30amenu Window.Split            <C-W>s
  55. 30amenu Window.Split\ To\ #        <C-W><C-^>
  56. 30amenu Window.Close            <C-W>c
  57. 30amenu Window.Close\ Other(s)        <C-W>o
  58. 30amenu Window.Next            <C-W>w
  59. 30amenu Window.Previous            <C-W>W
  60. 30amenu Window.Equal\ Height        <C-W>=
  61. 30amenu Window.Rotate\ Up        <C-W>R
  62. 30amenu Window.Rotate\ Down        <C-W>r
  63. if has("gui_win32")
  64.   30amenu Window.Select\ Font        :set guifont=*<CR>
  65. endif
  66.  
  67. " Programming menu
  68. 40amenu IDE.Make            :make<CR>
  69. 40amenu IDE.List\ Errors        :cl<CR>
  70. 40amenu IDE.List\ Messages        :cl!<CR>
  71. 40amenu IDE.Next\ Error            :cn<CR>
  72. 40amenu IDE.Previous\ Error        :cp<CR>
  73.  
  74. " Restore the previous value of 'cpoptions'.
  75. let &cpo = cpo_save
  76. unlet cpo_save
  77.